layui.use(['layer', 'form', 'table', 'ztree', 'laydate', 'admin', 'ax','upload'], function () {
    var layer = layui.layer;
    var form = layui.form;
    var table = layui.table;
    var $ZTree = layui.ztree;
    var $ax = layui.ax;
    var laydate = layui.laydate;
    var admin = layui.admin;
    var upload = layui.upload;

    /**
     * 系统管理--用户管理
     */
    var ApiTest = {
    	verifCode: ""
    };


    // 搜索按钮点击事件
    $('#btnApplayVerifCode').click(function () {
    	  var ajax = new $ax(Feng.ctxPath + "/mappApi/applayVerifCode", function (data) {
    		  console.log(data);
              Feng.success("获取成功 验证码："+data.data);

              ApiTest.verifCode = data.data;
              //关掉对话框
             
          }, function (data) {
              Feng.error("获取失败！" + data.responseJSON.message)
          });
          //ajax.set(data.field);
          ajax.start();
    	
    });
    
    // 搜索按钮点击事件
    $('#btnGenHongBao').click(function () {
    	var ajax = new $ax(Feng.ctxPath + "/mappApi/genHongBao", function (data) {
            Feng.success("生成成功！");
            console.log(data);

            //关掉对话框
        }, function (data) {
            Feng.error("添加失败！" + data.responseJSON.message)
        });
        ajax.set(ApiTest);
        ajax.start();
    	
    });





});
